//
// Decompiled by Jadx - 389ms
//
package gc;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.t;
import androidx.constraintlayout.widget.i;
import cc.c;
import fg.r;
import fh.a;
import fi.e;
import fi.h;
import fi.w;
import fi.y;
import fn.b;
import fn.j;
import fp.q;
import gj.k;
import java.util.HashMap;
import me.plusne.NativeTools;
import me.plusne.common.Http.Hook;
import me.plusne.common.Json.JsonHookStatic;
import me.plusne.common.Json.JsonWebdav;
import r.f;
import r.g;

public final class co {
    public static final HashMap<String, Object> a = new HashMap<>();
    public static String b;
    public static String c;
    public static String d;
    public static String e;

    public static void f(JsonWebdav jsonWebdav) {
        JsonWebdav jsonWebdav2;
        if (jsonWebdav == null) {
            jsonWebdav2 = new JsonWebdav();
        } else {
            jsonWebdav2 = jsonWebdav;
        }
        y.d();
        if (jsonWebdav2.getData() == null) {
            JsonWebdav.DataBean dataBean = new JsonWebdav.DataBean();
            dataBean.setYun_user(b.g("backup_user", ""));
            dataBean.setYun_pass(b.g("backup_pass", ""));
            dataBean.setYun_host(b.g("backup_host", ""));
            jsonWebdav2.setData(dataBean);
        } else {
            b.l(jsonWebdav2.getData().getYun_host(), "backup_host");
            b.l(jsonWebdav2.getData().getYun_user(), "backup_user");
            b.l(jsonWebdav2.getData().getYun_pass(), "backup_pass");
        }
        JsonHookStatic jsonHookStatic = fn.y.by;
        w wVar = new w(jsonHookStatic.getActivity());
        wVar.bj(fi.e.VIEW);
        LayoutInflater from = LayoutInflater.from(jsonHookStatic.getActivity());
        View inflate = from.inflate(-2113142748, (ViewGroup) null, false);
        int i = 0x7f820098;
        TextView textView = (TextView) i.cg(0x7f820098, inflate);
        if (textView != null) {
            i = 0x7f82009f;
            TextView textView2 = (TextView) i.cg(0x7f82009f, inflate);
            if (textView2 != null) {
                i = 0x7f8200a0;
                TextView textView3 = (TextView) i.cg(0x7f8200a0, inflate);
                if (textView3 != null) {
                    i = 0x7f8200d9;
                    ImageView imageView = (ImageView) i.cg(0x7f8200d9, inflate);
                    if (imageView != null) {
                        i = 0x7f8200e1;
                        EditText editText = (EditText) i.cg(0x7f8200e1, inflate);
                        if (editText != null) {
                            i = 0x7f820170;
                            EditText editText2 = (EditText) i.cg(0x7f820170, inflate);
                            if (editText2 != null) {
                                i = 0x7f820219;
                                EditText editText3 = (EditText) i.cg(0x7f820219, inflate);
                                if (editText3 != null) {
                                    c cVar = new c((LinearLayout) inflate, textView, textView2, textView3, imageView, editText, editText2, editText3, 1);
                                    ((EditText) cVar.g).setText(jsonWebdav2.getData().getYun_host());
                                    ((EditText) cVar.i).setText(jsonWebdav2.getData().getYun_user());
                                    ((EditText) cVar.h).setText(jsonWebdav2.getData().getYun_pass());
                                    imageView.setOnClickListener(new q(10));
                                    g.v(imageView, -2113535894);
                                    float f = 25;
                                    r.e.d(-2113535899, f, (EditText) cVar.i);
                                    r.e.d(-2113535899, f, (EditText) cVar.h);
                                    r.e.d(-2113535899, f, (EditText) cVar.g);
                                    r.e.d(-2113535903, f, textView2);
                                    r.e.d(-2113535903, f, (TextView) cVar.c);
                                    textView2.setText("查询云端数据");
                                    textView2.setOnClickListener(new r(cVar, from, 25, 3));
                                    ((TextView) cVar.c).setOnClickListener(new a(4, cVar));
                                    ((TextView) cVar.c).setText("备份到云端");
                                    wVar.ar = cVar.k();
                                    wVar.bk();
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
        throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
    }

    public static void g() {
        JsonHookStatic jsonHookStatic = fn.y.by;
        if (!jsonHookStatic.isLogin()) {
            new k(jsonHookStatic.getActivity());
            return;
        }
        if (jsonHookStatic.isExpire()) {
            f.i().l("已到期或者未登录");
            return;
        }
        w wVar = new w(jsonHookStatic.getActivity());
        wVar.bj(fi.e.LIST_ITEM);
        wVar.bi(jsonHookStatic.getAppName());
        fi.b bVar = new fi.b();
        bVar.b("您的礼物数量[" + o.d + "]");
        if (NativeTools.n(JsonHookStatic.l, jsonHookStatic.getUserInfo())) {
            bVar.b("管理菜单");
            bVar.b("新版自动操作");
            bVar.b("测试");
        }
        bVar.b("PlusNE菜单");
        if (j.ae("updateVoice")) {
            bVar.b("上传名片声音");
            bVar.d("上传名片声音(收藏)", "使用收藏的语音", "");
        }
        if (j.ae("lookHomeList")) {
            bVar.b("谁看过我主页(聊天界面版本)");
        }
        if (j.ae("recordList")) {
            bVar.b("谁看过我(官方数据)");
        }
        if (j.ae("textToVoice")) {
            bVar.b("文本转语音设置");
        }
        bVar.b("批量取消关注");
        if (j.ae("ChatBubbleCheck")) {
            bVar.b("聊天气泡(免会员)");
        }
        bVar.b("手动批量修改瞬间可见范围");
        bVar.b("批量修改瞬间可见范围");
        if (j.ae("selectUserId")) {
            bVar.b("查询用户ID");
        }
        if (j.ae("randTest")) {
            bVar.b("随机灵魂测试");
        }
        bVar.b("多账号聊天列表同步");
        wVar.ay(bVar);
        wVar.ae = new h(3, wVar);
        wVar.bk();
    }

    public static void h() {
        if (b.g("backup_user", "").equals(b) && b.g("backup_pass", "").equals(c) && b.g("backup_host", "").equals(d)) {
            return;
        }
        t.c().j(((Hook) dq.b.b(Hook.class)).addYunData(b.g("backup_user", ""), b.g("backup_pass", ""), b.g("backup_host", "")).subscribeWith(new c(fn.y.by.getActivity())));
    }
}
